import request from '@/utils/request'
import { ref } from 'vue'
export default () => {
	const getOpt = async () => {
		return request.get("mini/opt")
	}
	const loadUserOpt = async (name) => {
		return request.post("mini/opt/user", { name: name })
	}
	const loadServiceOpt = async (name) => {
		return request.post("mini/opt/service", { name: name })
	}

	const loadExceptUserOpt = async (name,user_ids) => {
		return request.post("mini/opt/except_user", { name: name,user_ids:user_ids })
	}
	const loadExceptServiceOpt = async (name,service_ids) => {
		return request.post("mini/opt/except_service", { name: name,service_ids:service_ids })
	}

	return {
		getOpt,
		loadUserOpt,
		loadServiceOpt,
		loadExceptUserOpt,
		loadExceptServiceOpt
	}
}